package com.ts.content.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ts.content.dto.TopicDTO;
import com.ts.content.entity.TopicEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TopicDao extends BaseMapper<TopicEntity> {

    public IPage<TopicDTO> getTopicList(IPage<TopicDTO> page);

    /**
     * 获取热门圈子
     * @param count
     * @return
     */
    List<TopicEntity> getHotTopic(@Param("count") Integer count);

    List<TopicEntity> getCurrentUserJoinTopic(@Param("userId")Integer userId);

}
